package com.song.shop;

import org.springframework.aop.framework.AopContext;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.data.redis.core.script.DefaultRedisScript;
import org.springframework.data.redis.core.script.RedisScript;

import java.util.Collections;

/**
 * @author Song Yinghui
 * @date 2018/8/22
 * @Version 1.0
 */
public abstract class BugTest {

    private RedisTemplate redisTemplate ;



    class InnerCLass{
        public void test(){
            System.out.println(redisTemplate);
        }
    }
    public void BugTest(){}
    public Boolean lock(String key , String value){
        String script = "" ;
        DefaultRedisScript redisScript = new DefaultRedisScript();
        redisScript.setScriptText(script);
        redisTemplate.execute(redisScript , Collections.singletonList(key) , value);
        ValueOperations operations = redisTemplate.opsForValue();

        return null;
    }


    public static void main(String[] args) {
        StringBuffer a = new StringBuffer("A");
        StringBuffer b = new StringBuffer("B");
        operator(a, b);
        System.out.println(a + "," + b);

        System.out.println(AccountType.FIXED);
    }
    public static void operator(StringBuffer x, StringBuffer y) {
        x.append(y);
        y = x;
    }


    enum AccountType
    {
        SAVING, FIXED, CURRENT;
        AccountType()
        {
            System.out.println("It is a account type");
        }
    }

    public void test(){
        System.out.println("-----");
    }

    public void test222(){

        char s = '宋';
//    char s1 = 'so' ;

    }

}


//    public static void main(String[] args) {
//
//        int hash = 5 ;
//        int n = 4;
//        int yushu = (n - 1) & hash ;
//        System.out.println(3 | 0);
//
//
//    }
//}
